<div class="bjui-pageContent">
    <form action="/admin/app/app-version-add" data-toggle="ajaxform"
          data-options="{closeCurrent: true, okAfterCallback: freshAppVersionList}">
        <div class="bjui-row col-2">


            <label class="row-label">app名称</label>
            <div class="row-input">
                <input type="text" size="30" class="input-sm"  value="" name="name" data-rule="required">
            </div><br/>

            <label class="row-label">版本号</label>
            <div class="row-input">
                <input type="text" size="30" class="input-sm" value="" name="version" data-rule="required">
            </div><br/>
            <label class="row-label">更新URL</label>
            <div class="row-input">
                <input type="text" size="60" class="input-sm" value="" name="url" data-rule="required">
            </div><br/>
            <label class="row-label">是否强制更新</label>
            <div class="row-input">
                <select name="is_force_update" data-toggle="selectpicker">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </div><br/>

            <label class="row-label">是否当前版本
            </label>
            <div class="row-input">
                <select name="is_current_version" data-toggle="selectpicker">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </div><br/>

            <label class="row-label">平台</label>
            <div class="row-input">
                <select name="platform" data-toggle="selectpicker">
                    <option value="1">android</option>
                    <option value="2">ios</option>
                </select>
            </div><br/>


            <label class="row-label">描述</label>
            <div class="row-input">
                <textarea  name="description" cols="30" rows="4" data-rule="required"></textarea>
            </div>

        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button>
        </li>
        <li>
            <button type="submit" class="btn-default" data-icon="save">保存</button>
        </li>
    </ul>
</div>
<script>
    function freshAppVersionList() {
        $("#app-version-list").datagrid("refresh", true);
    }
</script>